#include <stdio.h>

int main()
{
    int n = 0;
    int a = 0;
    int cnt = 0;
    int arr[1000];
    scanf("%d", &n);
    for (int i = 0;i < n;i++)
    {
        scanf("%d", &a);
        arr[i] = a;
    }
    int arr1[1000];
    for (int i = 1;i < n;i++)
    {
        cnt = 0;
        for (int j = 0;j < i;j++)
        {
            if (arr[j] < arr[i]) { cnt++; }
        }
        arr1[i] = cnt;
    }
    arr1[0]=0;
    for (int i = 0;i < n;i++)
    {
        printf("%d ", arr1[i]);
    }
    return 0;
}

